home *** CD-ROM | disk | FTP | other *** search
- Function.w COMPARE_STRINGS{*s1,*s2}
- .ASM_strcmpi
- MOVEA.l d0,a0
- MOVEA.l d1,a1
-
- MOVE.b #96,d2
- MOVE.b #123,d3
- MOVE.b #$DF,d4
-
- 'fetch: MOVE.b (a1)+,d1
- MOVE.b (a0)+,d0
-
- BEQ 'exit ; check if letter is null terminator
-
- CMP.b d2,d0
- BLE 'noup1
- CMP.b d3,d0
- BGE 'noup1
- AND.b d4,d0
-
- 'noup1: CMP.b d2,d1
- BLE 'noup2
- CMP.b d3,d1
- BGE 'noup2
- AND.b d4,d1
-
- 'noup2: CMP.b d0,d1 ; check if letters are same
- BEQ 'fetch ; if they are, move onto next kletter
-
- 'exit: ANDI.w #$00FF,d0 ; make sure that top byte of word is clear
- ANDI.w #$00FF,d1 ; make sure that top byte of word is clear
- SUB.w d1,d0 ; get return result
- AsmExit
- End Function
-
-